﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true"
    CodeFile="EditProduct.aspx.cs" Inherits="admin_EditProduct" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <title>Edit Product</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" runat="Server">
    <asp:SqlDataSource ID="SqlDataSourceCategory" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT * FROM [tbl_category]"></asp:SqlDataSource>
    <asp:FormView ID="FormViewProduct" runat="server">
        <ItemTemplate>
            <table style="width: 100%;" cellspacing="5">
                <tr>
                    <td style="width: 150px">
                        <asp:Label ID="Label2" runat="server" Text="Select Category"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList DataValueField="cat_name" ID="DropDownListCategory" runat="server"
                            Width="210px" DataSourceID="SqlDataSourceCategory">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Product Name"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtProductName" runat="server" Width="207px" Text='<%#Eval("pd_name")%>'></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="Description"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="207px" Text='<%#Eval("pd_description")%>'></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="Quantity"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtQuantity" runat="server" Text='<%#Eval("pd_quantity")%>'></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label5" runat="server" Text="Price"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtPrice" runat="server" Text='<%#Eval("pd_price")%>'></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="LabelImg" runat="server" Text="Image"></asp:Label>
                    </td>
                    <td>
                        <asp:FileUpload ID="FileUploadImageProduct" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                            <asp:Button ID="btnEditProduct" runat="server" Text="EditProduct" 
        onclick="btnAddProduct_Click" />
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:FormView>

</asp:Content>
